module.exports = {
    publicPath: process.env.NODE_ENV === "production" ? "/code/" : "./",
    outputDir: "code",
    productionSourceMap: false,
    filenameHashing: false,
    chainWebpack: (config) => {
        config.plugin("html").tap((args) => {
            args[0].title = "代码预览";
            return args;
        });
    },
    devServer: {
        host: "0.0.0.0", // 匹配本机IP地址(默认是0.0.0.0)
        port: 8082, // 开发服务器运行端口号
        disableHostCheck: true,
    },
};
